public class GuessGame{
    Player p1;
    Player p2;
    Player p3;
    
	public void startGame(){
        p1 = new Player();
        p2 = new Player();
        p3 = new Player();
		System.out.println("Game Start");
        int number = 0;
        while (true){
            number = (int) (Math.random() * 10);
            System.out.println("Number to be guessed: "+number);
            p1.guess();
            p2.guess();
            p3.guess();
            boolean guessp1 = false;
            boolean guessp2 = false;
            boolean guessp3 = false;
            boolean stop = false;
            if (p1.number == number){
                guessp1 = true;
            }
            if (p2.number == number){
                guessp2 = true;
            } 
            if (p3.number == number){
                guessp2 = true;
            }
            if (guessp1||guessp2||guessp3){
                stop = true;
            }
            if (stop){
                break;
            }
        }
	}
	
}
